package com.mail;

import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class MailUtilTest {
	ApplicationContext ac;
	MailUtil mail;
	@Before
	public void init (){
		ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
		mail = (MailUtil)ac.getBean("mailUtil");

	}
	@Test
	public void test(){
		mail.sendMail("358001699@qq.com", "11111");
	}
}
